<template>
  <section>
    <el-row style="padding: 10px;">
      <el-button type="primary">我的推荐</el-button>
    </el-row>
    <el-row style="padding: 80px 10px;border: 1px solid #cccccc">
      <h3>我的推荐ID：{{spreadInfo.userId}}</h3>
      <h3 style="margin-top: 30px">我的推荐地址：<span style="color: red;">{{spreadInfo.url}}</span></h3>
      <div style="margin-top: 10px">请复制完整地址给您的好友或者让您的好友在注册时填写您的推荐ID</div>
      <h3 style="padding: 20px 0;">本月推荐收益：<span style="color: red;">{{amount}}</span>
        <span style="color:#0000ff">查看明细</span></h3>
      <div>说明： 每天的7点更新收益，如3号7点，会计算2号0点-24点之间所有数据，然后增加您的收益。您的收益=推荐会
        员的有效投注额度总和 ÷ 100 × 0.1(转换率),小数部份四舍五入!(风险账号不参与收益计算)
      </div>
      <h3 style="padding: 20px 0;">我推荐的会员(共计 {{count}} ):</h3>
    </el-row>
  </section>
</template>

<script>
  export default {
    data () {
      return {
        spreadInfo: {},
        id: 623,
        address: 'http://www.cctv.com',
        amount: 0,
        count: 0
      }
    },
    beforeMount () {
      this.getSpreadData()
    },
    methods: {
      getSpreadData () {
        this.$api.spreadSelf().then(res => {
          if (res.code === '000000') {
            this.spreadInfo = res.data
            sessionStorage.setItem('userId', res.data.userId)
          }
        })
      }
    }

  }
</script>

<style lang="less" scoped>
  section {
    background-color: white;
    text-align: left
  }
</style>
